package com.flower.utils;

import org.springframework.format.annotation.DateTimeFormat;

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author lm
 * @create 2022-04-12 20:57
 */
public class DateUtils {
    public static String dateFormat(LocalDateTime date, String pattern){
        DateTimeFormatter sdf = DateTimeFormatter.ofPattern(pattern);
        String str = sdf.format(date);
        return str;
    }}

